<?php
class View
{
	private $path;

	public function __construct()
	{
		$this->path = dirname($_SERVER['SCRIPT_FILENAME']) . '/views/';
	}

	public function show($name)
	{
		$path = $this->path . $name . '.phtml';

		if (file_exists($path) == false)
		{
			throw new Exception('View not found in '. $path);
			return false;
		}
		include ($path);
	}
}